<template>
	<!-- 选购指南 -->
	<view class="box ">
		<view class="title-header c3 fs28 df aic mb20 jcsb">
			<view class="df aic" >
				<view class="label-icon mr12"></view>商品信息
			</view>
			<view class="c6 fs24"  >
				共<text class="app-theme">{{lengthGood||0}}</text>种
			</view>
			
			
		</view>
		<!-- 商品列表 -->
		<view class="" v-for="(supplier,isndex) in goodsList">
			<view class="df aic m20 jcsb">
				<view class="c3 fwb fs28 ">
					{{supplier.supplierName}}
				</view>  
				<view class="tag ml10" :class="supplier.isSelfSend==0?'tag-success':'tag-error'">
					{{supplier.isSelfSend==0?'平台配送':'商家配送'}}
				</view>
			</view>
			<view class="cert-box-item df  jcsb"   v-for="(item,index) in supplier.goodsList" >
				<u-image :src="item.image&&item.image.split(',')[0]"  border-radius="10" width="120rpx" height="120rpx"></u-image>
				<view class="ml20 ">
					<view class="title u-line-2 fwb"> {{ item.customGoodsName }}</view>
					<view class="goodsLabel mt10" >
						{{item.specName||''}}
					</view>
				</view>
				<view class="mt5 df jcsb u-text-right" style="flex-direction: column;width: 200rpx;">
					<view class="price-box ">
						<text class="price-symbol fs24">￥</text><text class="price fwb u-line-1">{{isHaveStock==0?'--':item.platformPrice||0}}</text>
					</view>
					<view class="">
						×{{item.purNum}}
					</view>
				</view>
			</view>
			<view class="df jcsb aic fs26 m20 ">
				<text class="c6 fwb">备注</text>
				<u-input @input="$emit('change',$event,isndex)" v-model="supplier.remark" placeholder="请输入备注" input-align="right"></u-input>
			</view>
		</view>
	</view>


	</view>
</template>

<script>
	export default {
		props:['goodsList','type','isHaveStock','lengthGood'],

		data() {
			return {
				shopInfo:null,
				selectOpen:false,
			}
		},
		mounted() {
			this.shopInfo = this.SHOPINFO
		},
		methods: {
		 handleOpen() {
			  this.selectOpen = !this.selectOpen;
			},
		}
	}
</script>

<style lang="scss" scoped>
		
	.tag{
		font-size: 24rpx;
		border-radius: 19rpx 19rpx 19rpx 19rpx;
		padding: 2rpx 10rpx;
		color: white;
	}
	.tag-success{
		background: #48A147;
	}
	.tag-error{
		background: #EF2929;
	}
	.handle {
		padding:20rpx;
	  margin-top: -14rpx;
	  background-color: white;
	  text-align: center;
	  color: #666666;
	  border-radius: 0 0 20rpx 20rpx;
	
	  &--select {
	    transition: transform 0.4s;
	
	    &--reverse {
	      transform: rotate(-180deg);
	    }
	  }
	}
	.label-icon{
		width: 6rpx;
		height: 30rpx;
		background: linear-gradient(90deg, #48A147 0%, #8AE38A 100%);
		border-radius: 22rpx 22rpx 22rpx 22rpx;
		opacity: 1;
	}
	.border0{
		border-width: 0 !important;
	}
	.box-tip{
		margin: 20rpx 30rpx;
		font-size: 24rpx;
		font-family: PingFangSC-Regular-, PingFangSC-Regular;
		font-weight: normal;
		color: #EF2929;
		line-height: 30rpx;
		.item{
			
		}
	}
	.zq{
		color: #004EFF !important;
	}
	.box {
		border-radius: 20rpx;
		margin: 20rpx 30rpx;
		background-color: white;
		font-size: 24rpx;
		font-family: PingFangSC-Regular-, PingFangSC-Regular;
		font-weight: normal;

		.title-header {
			font-family: PingFang SC-Bold, PingFang SC;
			font-weight: bold;

			border-bottom: 2rpx solid #E5E5E5;
			padding: 20rpx;

			.title-icon {
				width: 6rpx;
				height: 30rpx;
				background: #47A848;
				border-radius: 3rpx 3rpx 3rpx 3rpx;
			}

			margin-bottom: 0;
		}

		.cert-box-item {
			border-bottom: 2rpx dashed #E5E5E5;
			padding: 20rpx 0;
			margin: 0 20rpx;

			.cert-box-item:last-child {
				border-bottom-width: 0 !important;
			}

			.spec {
				font-size: 24rpx;
				font-family: PingFang SC-Regular, PingFang SC;
				font-weight: 400;
				color: #666666;
				margin-top: 15rpx;
			}

			.title {
				width: 330rpx;
				font-size: 26rpx;
				font-family: PingFang SC-Medium, PingFang SC;
				font-weight: 500;
				color: #333333;
				line-height: 36rpx;
				// height: 74rpx;
			}

			.price-box {
				.price-symbol{
					color: #EF2929;
					
				}
				>.price {
					color: #EF2929;
					font-size: 30rpx;
					font-family: PingFang SC-Bold, PingFang SC;
				}

				>.unit {}

				>.old-price {
					color: #999999;
					font-family: PingFang SC-Regular, PingFang SC;
					font-weight: 400;
					text-decoration: line-through;
				}
			}

		}

		.type-status {
			font-size: 24rpx;
			font-family: PingFangSC-Regular-, PingFangSC-Regular;
			font-weight: normal;
			color: #2AAD3E;
		}

	}
</style>